import {
  SUPPLIER_CATEGORY_SELECT_LIST,
  SUPPLIER_TYPE_SELECT_LIST,
  CONTRACT_STATUS_SELECT_LIST
} from '@supplier/constants/common'

// 供应商管理 - 供应商合同管理
const FORM_ITEM_LIST = [
  {
    prop: 'contractCode',
    label: '合同编号',
    type: 'input',
  },
  {
    prop: 'contractName',
    label: '合同名称',
    type: 'input',
  },
  {
    prop: 'supplierCode',
    label: '供应商代码',
    type: 'input',
  },
  {
    prop: 'supplierName',
    label: '供应商名称',
    type: 'input',
  },
  {
    prop: 'supplierClassify',
    label: '供应商分类',
    type: 'select',
    clearable: true,
    options: SUPPLIER_CATEGORY_SELECT_LIST
  },
  {
    prop: 'supplierType',
    label: '供应商类型',
    type: 'select',
    clearable: true,
    options: SUPPLIER_TYPE_SELECT_LIST
  },
  {
    prop: 'contractType',
    label: '合同类型',
    type: 'select',
    clearable: true,
    dict: 258
  },
  {
    prop: 'contractStatus',
    label: '合同状态',
    type: 'select',
    clearable: true,
    options: CONTRACT_STATUS_SELECT_LIST
  },
  {
    prop: 'contractTime',
    label: '合同到期时间',
    type: 'datePicker',
    datePickerType: 'daterange',
    valueFormat: 'yyyy-MM-dd'
  },
  {
    prop: 'createUser',
    label: '发起人',
    type: 'input',
  },
  {
    prop: 'createTime',
    label: '发起时间',
    type: 'datePicker',
    datePickerType: 'daterange',
    valueFormat: 'yyyy-MM-dd'
  },
]
const TABLE_COLUMNS = [
  {
    title: '序号',
    key: 'index',
    width: 50
  },
  {
    title: '合同编号',
    key: 'contractCode',
  },
  {
    title: '合同名称',
    key: 'contractName',
  },
  {
    title: '供应商代码',
    key: 'supplierCode',
  },
  {
    title: '供应商名称',
    key: 'supplierName',
  },
  {
    title: '供应商分类',
    key: 'supplierClassifyName',
  },
  {
    title: '供应商类型',
    key: 'supplierTypeName',
  },
  {
    title: '合同类型',
    key: 'contractTypeName',
  },
  {
    title: '合同状态',
    key: 'contractStatusName',
  },
  {
    title: '合同到期时间',
    key: 'contractEndTime',
  },
  {
    title: '发起人',
    key: 'createUser',
  },
  {
    title: '发起时间',
    key: 'createTime',
  }
]
export {
  FORM_ITEM_LIST,
  TABLE_COLUMNS
}
